﻿using EntityManage.ServiceReference1;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EntityManage
{
    public class UserManager
    {
        public static Users Login(string loginID, string password)
        {
            Service1Client client = new Service1Client();
            return client.Login(loginID, password);
        }

        public static bool Regist(string loginID, string password, string nickName)
        {
            Service1Client client = new Service1Client();
            return client.Regist(loginID, password, nickName);
        }

        public static bool CheckLoginExist(string loginid)
        {
            Service1Client client = new Service1Client();
            return client.CheckLoginExist(loginid);
        }

        public static Dictionary<int, string> GetFriendsList(int id)
        {
            Service1Client client = new Service1Client();
            return client.GetFriendsList(id);
        }

        public static Users GetUsers(int id)
        {
            Service1Client client = new Service1Client();
            return client.GetUsers(id);
        }

        public static bool AddFriend(int myid, string myname, int friendid, string friendname)
        {
            Service1Client client = new Service1Client();
            return client.AddFriend(myid, myname, friendid, friendname);
        }

        public static bool EditNickName(int id, string nickName)
        {
            Service1Client client = new Service1Client();
            return client.EditNickName(id, nickName);
        }

    }
}
